project(QtDemo)

#macro
add_definitions(-DUNICODE -D_UNICODE)

# compile features
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)

# import Qt
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# 开启Qt代码自动生成，不再需用自己手写了。按顺序，分别是`Q_OBJECT`宏展开，资源文件，界面文件。
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# 使用Qt的模块
set(MEQT_LIB Core Widgets)
find_package(Qt5 COMPONENTS REQUIRED ${MEQT_LIB})

# eigen support
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR}
    ${ME_SOURCE_DIR}
    ${CERES_INCLUDE_DIR}
    )

### qt image
add_executable(qt_image qt_image.cpp)
qt5_use_modules(qt_image ${MEQT_LIB})
target_link_libraries(qt_image ${OpenCV_LIBS})

# add subdirectory
## core
add_subdirectory(Core)
## qt opengl demo
add_subdirectory(QtOpenglDemo1)
## cmdline
add_subdirectory(Cmdline)
## mulitithread
add_subdirectory(MultiThread)
